package com.ruoyi.excel.handle;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 每隔一分钟检查一下要处理的异步任务
 *
 * @author fjw
 * @date 2023-09-27
 */
@Slf4j
@Component
@EnableScheduling
public class AsyncImExportDataTask {
    @Autowired
    private AsyncImExportDataHandle asyncImExportDataHandle;

    //复制执行一次
    @Scheduled(cron = "0 0/1 * * * ?")
    private void asyncImExportData() {
        asyncImExportDataHandle.dealAsyncTask();
    }
}
